"""
爬虫的流程?
模拟客户端 向服务器的 资源地址 发送请求
1.确认ur资源地址
2.构建http协议的请求头
3.发送请求
4.获取响应
5.对数据进行清洗
6.保存数据
https://www.douyin.com/aweme/v1/play/?video_id=v0200fg10000c649jcrc77uee3a4p4i0&line=0&file_id=7c3ed941c6154385b23769f6cca9e2e0&sign=89fe619e506e6f47f999adfee8ee60a3&is_play_url=1&source=PackSourceEnum_PUBLISH&aid=6383
https://www.douyin.com/aweme/v1/play/?video_id=v0200fg10000c6599e3c77u169s6okpg&line=0&file_id=81e6e45d76b04ec0808ba18583a104e0&sign=35f1ac04bb4d87c2fd614ff47fbeb901&is_play_url=1&source=PackSourceEnum_PUBLISH&aid=6383
https://www.douyin.com/aweme/v1/play/?video_id=v0200fg10000c64j8bbc77ud9rj84tk0&line=0&file_id=520164d17ebb4063a2f36996d196912e&sign=47c7226fc1d19996978f6288315899e9&is_play_url=1&source=PackSourceEnum_PUBLISH&aid=6383
https://www.douyin.com/aweme/v1/play/?video_id=v0200fg10000c6cg733c77u5ga0vcn20&line=0&file_id=0745423dcbb04b4cb45b512e97b47f29&sign=44bf8b24c55dfdeb50f6f27cafc8d93f&is_play_url=1&source=PackSourceEnum_PUBLISH&aid=6383
https://www.douyin.com/aweme/v1/play/?video_id=v0200fg10000c6bludbc77u2lec5du80&line=0&file_id=957d653c2bcb44c6b32262428ff0f292&sign=8b1e68ebd9d67758449b227bcedde8d8&is_play_url=1&source=PackSourceEnum_PUBLISH&aid=6383
https://www.douyin.com/aweme/v1/play/?video_id=v0200fg10000c6bgfl3c77u21rcodln0&line=0&file_id=1b5bb26b1d1d440fad2c9dd9281428bf&sign=9de9dfed6007d191ab840d0208cd61a9&is_play_url=1&source=PackSourceEnum_PUBLISH&aid=6383
https://www.douyin.com/aweme/v1/play/?video_id=v0200fg10000c6bgekjc77u5vrqa2r1g&line=0&file_id=26a116188bc446cd867b5a08aab8f25e&sign=5fded4b364115b9bc6f52ce31c2cb7f9&is_play_url=1&source=PackSourceEnum_PUBLISH&aid=6383
https://www.douyin.com/aweme/v1/play/?video_id=v0200fg10000c6bgdd3c77u6b8nk7ao0&line=0&file_id=083340839d0141c19f637fde37350918&sign=4993498038ef508f0a851391dd8ec58c&is_play_url=1&source=PackSourceEnum_PUBLISH&aid=6383
https://www.douyin.com/aweme/v1/play/?video_id=v0200fg10000c6a7r7rc77u1mv9vic10&line=0&file_id=56fae68cecca4f01bdd5ccbc6926f24b&sign=e7f32cc30ff42fbe8b6b12c7875c0784&is_play_url=1&source=PackSourceEnum_PUBLISH&aid=6383
"""

import requests
# 图片地址
# 1.确认ur资源地址
url="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fup.enterdesk.com%2Fedpic%2F09%2F3a%2Fbc%2F093abce7b31f4c8ffdbf345375ff4abb.jpg&refer=http%3A%2F%2Fup.enterdesk.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1649599227&t=958d48f7b4f6e552ea2e6849ed76766f"

# 3.发送请求
# 4.获取响应
res=requests.get(url)
# 6.保存数据
with open("图片.jpg","wb")as f:
    f.write(res.content)










